﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using YJ.JobSchedule.Configuration;

namespace WindowsService1
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {

            Log4Logger.Init();

            JobConfiguationManager.InitOrStartJob("winjobtest1", "测试1", () =>
            {
                Log4Logger.WriteInfo("winjobtest1:" + DateTime.Now);
            }, false, "gggg");

            JobConfiguationManager.InitOrStartJob("winjobtest2", "测试2", () =>
            {
                Log4Logger.WriteInfo("winjobtest2:" + DateTime.Now);
            }, false, "gggg");
        }

        protected override void OnStop()
        {
        }
    }
}
